<!DOCTYPE html>
<head>
  <#assign dicSelect = JspTaglibs["http://www.casic304.cn/dicSelect"]/>
  <#assign secSelect = JspTaglibs["http://www.casic304.cn/secSelect"] />
  <#assign fillDept=JspTaglibs["http://www.casic304.cn/fillDept"] />
  <#assign DutyDept = JspTaglibs["http://www.casic304.cn/DutyDept"]/>
  <meta charset="utf-8">
  <title>现场问题处理单基本信息</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <link rel="stylesheet" href="${ctx}/layui/css/layui.css" media="all"/>
  <link rel="stylesheet" href="${ctx}/qbdmsStatic/iconfont/iconfont.css"/>
  <link rel="stylesheet" href="${ctx}/qbdmsStatic/style/qbdms.css">

  <link rel="stylesheet" href="${ctx}/qbdmsStatic/public/ztree/zTreeStyle.css"/>
  <script src="${ctx}/qbdmsStatic/public/ztree/jquery.min.js"></script>
  <script src="${ctx}/qbdmsStatic/public/ztree/jquery.ztree.all.min.js"></script>

  <script type="text/javascript">
    var __ctx = "${ctx}";
  </script>
</head>
<body class="listBody">
<div class="qbdms-bodyDiv">
  <div class="layui-table-view-body qbdms-add-view-body">
    <form class="layui-form formPreview"  requrl="${ctx}/qbdms/wQbdProblemHandle/get" lay-filter="wQbdProblemHandleDataForm" id="wQbdProblemHandleDataForm">
      <div class="layui-hide">
        <input type="text" name="id" placeholder="请输入" autocomplete="off" class="layui-input " maxlength="50">
        <input name="filldeptid" value="${filldeptid}" style="display: none"/>
        <input name="filldept" value="${filldept}" style="display: none"/>
        <input name="fillmanaccount" value="${fillmanaccount}" style="display: none"/>
        <input name="fillman" value="${fillman}" style="display: none"/>
        <input name="filldate" value="${filldate}" style="display: none"/>
        <input name="flowStatus" value="${flowStatus}" style="display: none"/>
      </div>
      <div class="qbdms-formTitle">现场问题处理单 <i class="qbdms-returnOn closeWindow" id="back">返回</i></div>
      <div class="qbdms-formBody">
        <div class="layui-row">
          <div class="qbdms-oneForm">
            <label class="layui-form-label qbdms-label" title="密级">密级<span style="color: red;">*</span></label>
            <div class="layui-input-block qbdms-input">
              <@secSelect.sec_select data_src=1 required=true name="secret" id="secret"/>
            </div>
          </div>
          <div class="qbdms-oneForm">
            <label class="layui-form-label qbdms-label" title="编号">编号<span style="color: red;">*</span></label>
            <div class="layui-input-block qbdms-input">
              <input type="text" placeholder="自动生成" autocomplete="off" class="layui-input textInput isReadonlyInput" name="registernum" id = "registernum" maxlength="50" readonly>
            </div>
            <input type="hidden" name="registernumb" id="registernumb">
          </div>
          <div class="qbdms-oneForm">
            <label class="layui-form-label qbdms-label" title="提出时间">提出时间</label>
            <div class="layui-input-block qbdms-input">
              <input type="text" placeholder="请选择" autocomplete="off" class="layui-input dateTimeFiled input-right time-init" name="proposetime" id="proposetime" format="yyyy-MM-dd" datetype="date" lay-verify="required" lay-reqtext="提出时间是必填项" maxlength="7">
            </div>
          </div>
          <div class="qbdms-oneForm">
            <label class="layui-form-label qbdms-label" title="型号">型号<span style="color: red;">*</span></label>
            <div class="layui-input-block qbdms-input">
              <select id="model" name="model" class="layui-input filter-value" lay-search="" lay-verify="required" lay-reqtext="型号是必填项" lay-filter="xh" maxlength="50"></select>
            </div>
          </div>
          <div class="qbdms-oneForm">
            <label class="layui-form-label qbdms-label" title="提出单位"><span style="color: red;">*</span>提出单位</label>
            <div class="layui-input-block qbdms-input">
              <select id="proposedeptid" name="proposedeptid" autocomplete="off"
                      class="layui-input" lay-filter="proposedeptid"
                      fieldname="proposedeptid" lay-verify="required"
                      lay-reqtext="提出单位是必填项">
              </select>
            </div>
            <input type="hidden" name="proposedept" id="proposedept">
          </div>
          <div class="qbdms-oneForm" id="dutypersondiv">
            <label class="layui-form-label qbdms-label" title="责任人">责任人<span style="color: red;">*</span></label>
            <button type="button" class="layui-btn qbdms-twoBtn" id="selectdutypersonBtn" style="float: right">选择</button>
            <div class="layui-input-block qbdms-input qbdms-inputIsButton">
              <input type="text" placeholder="请选择" autocomplete="off" class="layui-input textInput" lay-verify="required" lay-reqtext="责任人是必填项" name="dutyperson" maxlength="50" readonly>
            </div>
          </div>
          <div class="qbdms-oneForm" id="dutypersoniddiv" style="display: none">
            <label class="layui-form-label qbdms-label" title="注册编号">责任人id<span style="color: red;">*</span></label>
            <div class="layui-input-block qbdms-input">
              <input type="text" name="dutypersonid" placeholder="自动计算" autocomplete="off" class="layui-input  textInput isReadonlyInput" lay-verify="required" lay-reqtext="责任人id是必填项" maxlength="50" readonly>
            </div>
          </div>
          <div class="qbdms-oneForm" id="dutydeptdiv">
            <label class="layui-form-label qbdms-label" title="注册编号">责任单位<span style="color: red;">*</span></label>
            <div class="layui-input-block qbdms-input">
              <input type="text" name="dutydept" placeholder="根据责任人带入" autocomplete="off" class="layui-input  textInput isReadonlyInput" lay-verify="required" lay-reqtext="责任单位是必填项" maxlength="50" readonly>
            </div>
          </div>
          <div class="qbdms-oneForm" id="dutydeptiddiv" style="display: none">
            <label class="layui-form-label qbdms-label" title="注册编号">责任单位id<span style="color: red;">*</span></label>
            <div class="layui-input-block qbdms-input">
              <input type="text" name="dutydeptid" placeholder="自动计算" autocomplete="off" class="layui-input  textInput isReadonlyInput" lay-verify="required" lay-reqtext="责任单位id是必填项" maxlength="50" readonly>
            </div>
          </div>
          <div class="qbdms-oneForm">
            <label class="layui-form-label qbdms-label" title="流程状态">流程状态<span style="color: red;">*</span></label>
            <div class="layui-input-block qbdms-input">
              <select  id="status" name="status"  lay-filter="status" lay-search="" lay-verify="required" lay-reqtext="流程状态是必填项"></select>
            </div>
          </div>
          <#if flag=='1' && (flowStatus=="2" || flowStatus=="3")>
            <#include "/wQbdProblemHandle/two.html">
          </#if>
          <#if flag =="1">
          <div class="qbdms-oneForm" style="width: 100%">
            <label class="layui-form-label qbdms-label">型号助理员确认</label>
            <div class="layui-input-block qbdms-input">
              <#list taskOpinionNewList as taskOpinionNewList>
              <#if taskOpinionNewList.taskName == "型号助理员确认1">
              <p>${taskOpinionNewList.opinion}</p><br/>
              <p style="text-align:right;">审批人:${taskOpinionNewList.exeFullname}&nbsp&nbsp&nbsp&nbsp
                日期:${(taskOpinionNewList.endTime?string("yyyy-MM-dd"))!}</p>
              </#if>
            </#list>
              <#list taskOpinionNewList as taskOpinionNewList>
              <#if taskOpinionNewList.taskName == "型号助理员确认2">
              <p>${taskOpinionNewList.opinion}</p><br/>
              <p style="text-align:right;">审批人:${taskOpinionNewList.exeFullname}&nbsp&nbsp&nbsp&nbsp
                日期:${(taskOpinionNewList.endTime?string("yyyy-MM-dd"))!}</p>
            </#if>
            </#list>
            </div>
          </div>
          <div class="qbdms-oneForm" style="width: 100%">
            <label class="layui-form-label qbdms-label">型号主管副总师</label>
            <div class="layui-input-block qbdms-input" style="width: 100%">
              <#list taskOpinionNewList as taskOpinionNewList>
              <#if taskOpinionNewList.taskName == "型号主管副总师">
              <p>${taskOpinionNewList.opinion}</p><br/>
              <p style="text-align:right;">审批人:${taskOpinionNewList.exeFullname}&nbsp&nbsp&nbsp&nbsp
                日期:${(taskOpinionNewList.endTime?string("yyyy-MM-dd"))!}</p>
            </#if>
          </#list>
          </div>
          </div>
          </#if>
      </div>
  </div>
  <div class="layui-form-item btnformItem">
    <p>
      <span id="hideAndShow" style="display: none;">
          <a lay-submit lay-filter="wQbdProblemHandle" class="layui-btn btn-n privateSubmit qbdms-oneBtn" requrl="${ctx}/qbdms/wQbdProblemHandle/save" id="urlFormSave">保存</a>
          <a lay-filter="wProblemresetMsg" id="run" class="layui-btn btn-n qbdms-oneBtn">启动</a>
          <button type="reset" id="closeWindow" style="margin-left: 10px;" class="layui-btn layui-btn-sm btn-save qbdms-oneBtnLine">取消</button>
      </span>
    </p>
  </div>
  </form>
</div>
</div>
<script src="${ctx}/qbdmsStatic/public/configFile.js"></script>
<script src="${ctx}/layui/layui.js"></script>
<script>
  var vaildFlag ;
  var runFlag=false;
  var flowStatus="${flowStatus}";
  layui.config({
    base: serverPath.qbdmsPath + staticPath.qbdmsPath //静态资源所在路径
  }).extend({
    index: 'lib/index' //主入口模块
  }).use(['index', 'setter', 'layer', 'propsHandle', 'upload', 'common', 'laydate', 'jquery', 'publicMethods', 'qbdmsForm', 'commonDialog'], function () {
    var $ = layui.jquery,
        laydate = layui.laydate,
        setter = layui.setter,  // 配置信息
        layer = layui.layer,
        common = layui.common,
        propsHandle = layui.propsHandle,
        upload = layui.upload,
        publicMethods = layui.publicMethods,
        commonDialog = layui.commonDialog,
        formId = '' || '',
        defProps = {
          //viewMould: 'form/formDef/view/formDesign/moulds/', // 组件模块 存放文件 *****
          viewMould: 'moulds/', // 组件模块 存放文件 *****
          initCss: [
            'style/currencyCss'
          ],
          // formAreaInfo:'.formPreview',
          formAreaInfo: 'html',
          temDate: '.temDate',
          uploadFileBtn: '.uploadFileBtn',
          uploadImgBtn: '.uploadImgBtn',
          richTextArea: '.richTextArea',
          selectInput: '.selectInput',
          radioOptionCont: '.radioOptionCont',
          dataLexiTree: '.dataLexiTree',
          selectorBtn: '.selectorBtn',
        },
        temQuery = new propsHandle(),  // 实例化模板功能部分
        form = layui.qbdmsForm;
    // 初始化模板功能
    temQuery.initTem({
      selectorBtn: defProps.selectorBtn,
      selectorTemPath: setter.views + defProps.viewMould
    });

    if("${flag}"=='1' && ("${flowStatus}"=="2" || "${flowStatus}"=="3")) {
      $(".subContTem").hide();
      $(".qbdms-SubTableTitle").hide();
      $(".qbdms-tableDiv").hide();
      $("#secret").attr("disabled", true);
      $("#registernum").attr("disabled", true);
      $("#proposetime").attr("disabled", true);
      $("#model").attr("disabled", true);
      $("#proposedept").attr("disabled", true);
      $("#proposedeptid").attr("disabled", true);
      $("#dutypersondiv").attr("style","display:none;");
      $("#dutydeptdiv").attr("style","display:none;");
    }

    //责任单位
    var researchRoomList =${researchRoomList};
    var researchRoom = function(optionObj, item){
      optionObj.text = item.orgName;
      optionObj.value = item.code;
    };
    common.initDicData("proposedeptid", researchRoomList, "", researchRoom);
    if("${flag}"=='1' && ("${flowStatus}"=="2" || "${flowStatus}"=="3")) {
      common.initDicData("impdeptid", researchRoomList, "", researchRoom);
    }

    // 型号代号
    var xhdh = eval('${wQbdXhdhs}'); //型号代号
    var initXHDH = function (optionObj, item) {
      optionObj.text = item.fModelcode;
      optionObj.value = item.fModelcode;
    };
    common.initDicData("model", xhdh, "", initXHDH);

    $(".subContTem").hide()
    // 子表初始化事件
    temQuery.initSubEvent(defProps, serverPath, setter);
    var dateTimeFiledLen = $(".dateTimeFiled");
    for (var i = 0; i < dateTimeFiledLen.length; i++) {
      laydate.render({
        elem: dateTimeFiledLen[i] //指定元素
        , type: 'date'
        , trigger: 'click'
      });
    }

    //- 添加表单验证规则 开始 ---------------------------------------------------------------------
    form.verify({
      length100:[/^.{0,100}$/,'输入字符数不能超过100'],
      length2000:[/^.{0,2000}$/,'输入字符数不能超过2000'],
      fileRequired: function (value,item) {
        value = $(item).siblings(".uploadInput").val()
        if(!new RegExp(/[\S]+/).test(value)){
          return common.verifyTitleAdd(item) +"没有上传对应附件"
        }
      },
      money: function (value,item) {
        if (value && !new RegExp(/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/).test(value)) {
          return common.verifyTitleAdd(item) +'请输入数字且小数最多两位';
        }
      },
      integer: function (value,item) {
        if (value && !new RegExp(/^[+]{0,1}(\d+)$/).test(value)) {
          return common.verifyTitleAdd(item) + '请输入正整数';
        }
      }
    });
    //- 添加表单验证规则 结束 ---------------------------------------------------------------------

    vaildFlag = false;
    $("#urlFormSave").click(function () {
      //- 添加表单验证规则 开始 ---------------------------------------------------------------------
      form.verify({
        length100:[/^.{0,100}$/,'输入字符数不能超过100'],
        length2000:[/^.{0,2000}$/,'输入字符数不能超过2000'],
        fileRequired: function (value,item) {
          value = $(item).siblings(".uploadInput").val()
          if(!new RegExp(/[\S]+/).test(value)){
            vaildFlag = false;
            return common.verifyTitleAdd(item) +"没有上传对应附件"
          }
        },
        money: function (value,item) {
          if (value && !new RegExp(/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/).test(value)) {
            vaildFlag = false;
            return common.verifyTitleAdd(item) +'请输入数字且小数最多两位';
          }
        },
        integer: function (value,item) {
          if (value && !new RegExp(/^[+]{0,1}(\d+)$/).test(value)) {
            vaildFlag = false;
            return common.verifyTitleAdd(item) + '请输入正整数';
          }
        }
      });
      //- 添加表单验证规则 结束 ---------------------------------------------------------------------
      //- 附件密级不能高于表单密级 开始 ------------------------------------------------------
      var selectMaxVal = 0;
      var formSecretVal = $("[name='secret']").val();
      $(".fileSecLevel select").each(function () {
        selectMaxVal = selectMaxVal >= $(this).val() ? selectMaxVal : $(this).val();
      });

      if (selectMaxVal > formSecretVal) {
        layer.msg('附件密级不能高于表单密级。', {icon: 5});
        vaildFlag = false;
        return false;
      }
      //- 附件密级不能高于表单密级 结束 ------------------------------------------------------
      vaildFlag=form.VerifyForm("wQbdProblemHandleDataForm");
    });

    //关闭当前页面
    $("#closeWindow,.closeWindow").click(function () {
      window.location.href = '${ctx}/qbdms/wQbdProblemHandle/view/list';
    });

    //下载附件
    window.downFile = function (obj) {
      var fileId = $(obj).parents("span").attr("fileId");
      window.location.href = serverPath.qbdmsPath + setter.extendLinkPath + "attachFile/download?fileId=" + fileId;
    }
    // 删除
    $(document).on('click', '.deleteFile', function () {
      $(this).parent().parent().siblings("button").show()
      $(this).parent().remove();
      $(".uploadFileList").each(function (i, v) {
        common.constructFileStr(v)
      });
    });

    if(flowStatus == null || flowStatus == 0|| flowStatus==99){
      $("#hideAndShow").show();
    }else{
      $("#back").hide();
    }
    if(flowStatus==99){
      $("#run").hide();
    }

    form.on('select(proposedeptid)', function (data) {
      $("#proposedept").val(data.elem[data.elem.selectedIndex].text);

      var proid=$("#proposedeptid").val();
      //获取编号
      $.ajax({
        url: serverPath.qbdmsPath + "/qbdms/wQbdProblemHandle/getRegNum",
        type: "get",
        data: {"proposedeptid":proid},
        dataType: 'json',
        success: function (result) {
          if (null != result.data) {
            $("#registernum").val(result.data.regNum);
            $("#registernumb").val(result.data.regNumb);
          }
        }
      });
    });
    if("${flag}"=='1' && ("${flowStatus}"=="2" || "${flowStatus}"=="3")) {
      form.on('select(impdeptid)', function (data) {
        $("#impdept").val(data.elem[data.elem.selectedIndex].text);
      });
    }

    var common = layui.common;
    var index = parent.layer.getFrameIndex(window.name);
    common.updateForm({
      name:'wQbdProblemHandleDataForm',
      idValue:"${id}",
      primary:"id",
      beforeSubmitFun: function (data) {
        //- 附件密级不能高于表单密级 开始 ------------------------------------------------------
        var selectMaxVal = 0;
        var formSecretVal = $("[name='secret']").val();
        $(".fileSecLevel select").each(function () {
          selectMaxVal = selectMaxVal >= $(this).val() ? selectMaxVal : $(this).val();
        });

        if (selectMaxVal > formSecretVal) {
          layer.msg('附件密级不能高于表单密级。', {icon: 5});
          return false;
        }
        //- 附件密级不能高于表单密级 结束 ------------------------------------------------------
        $(".uploadFileList").each(function (i, v) {
          common.constructFileStr(v)
        });
        var files=[];
        //整理上传附件的隐藏域，将提交的字符串转为json对象
        $(".uploadInput").each(function () {
          var uploadName = $(this).attr("name");
          if (!$(this).val()) {
            return;
          }
          data.field[uploadName] = eval($(this).val());
          files=files.concat(eval($(this).val()));
        });

        return common.setFileLevel(files);

      },
      getCallback: function (data) {
        $("input[name='dutyperson']").attr("ids", data.data.dutypersonid);

        $("#tbxx").html("<span class='qbdms-TBinformation'>填报信息:</span><span class='qbdms-TBinformationText'>【" + data.data.filldept + " | " + data.data.fillman + " | " + data.data.filldate + "】</span>");

        $('.uploadFileList').each(function () {
          var fileUploadName = $(this).attr("fileUploadName");
          var jsonFile = data.data[fileUploadName];
          var files = eval(jsonFile);

          if (files) {
            for (var i = 0; i < files.length; i++) {
              var fileLevel = files[i].fileLevel;
              var fileLevelText = files[i].fileLevelText;
              var fileSec = '<div class="fileSecLevel fileSecXg layui-input-inline">' + '<@secSelect.sec_select data_src=1 hasBlank=false/>' + "</div>";
              var newStr = '<span class="file-id" style="margin-right: 20px;" fileId=' + files[i].fileId + ' fileLevelText="' + fileLevelText + '">' + fileSec + '<span class="file-name" title="点击下载文件" onclick="downFile(this)"><i class="iconfont" style="margin-right: 5px"></i>' + files[i].fileName + '</span></span>';
              $(this).html(newStr);
              $(this).find("select:last").val(fileLevel);
              $(this).find("select:last").attr("disabled", "disabled");
            }
          } else {
            $(this).html("<span style='color: #c0c4cc'>未上传</span>");
          }
        });
      },
      updateCallback:function (data) {
        if((flowStatus==0||flowStatus==""||null==flowStatus)&&runFlag==true){
          run(data.data.id);
        }
        if (publicMethods._filterRecord(data)) {
          if ($(".privateSubmit")) {
            $(".privateSubmit").attr("disabled", false).css("pointer-events", "auto");
          }
          if((flowStatus=="0" || flowStatus==null||flowStatus==""||flowStatus=="99")&&runFlag==false) {
            layer.alert(publicMethods.confirmStyle(data.msg), {title: false, skin: 'confirm-class'},
                function (index) {
                  layer.close(index);
                  window.location.href = '${ctx}/qbdms/wQbdProblemHandle/view/list';
                });
          }
        } else {
          if((flowStatus=="0" || flowStatus==null||flowStatus==""||flowStatus=="99")&&runFlag==false) {
            layer.alert(publicMethods.confirmStyle(data.msg), {title: false, skin: 'confirm-class'},
                function (index) {
                  layer.close(index);
                  window.location.href = '${ctx}/qbdms/wQbdProblemHandle/view/list';
                });
          }
        }
        runFlag=false;
        return false;
      }
    });

    if("${flag}"=='1' && ("${flowStatus}"=="2" || "${flowStatus}"=="3")) {
      var wjbgyjList = eval('${wjbgyjList}'); //文件变更意见
      common.initDicData("changesuggest", wjbgyjList, "");
    }
    var xcwtclslcztList = eval('${xcwtclslcztList}'); //流程状态
    common.initDicData("status", xcwtclslcztList, "");

    var secSelect = '<@secSelect.sec_select data_src=1 hasBlank=false/>'
    common.uploadfun(".fileUpload", {
      acceptMime: 'application/pdf, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document',
      exts: "doc|docx|pdf",
      secSelect: secSelect,
      isSub: false,
      upLoadSize:102400,
      upLoadNumber: 1,
      isMultiFile: false
    });

    //-- 责任人责任单位选择器 开始 --------------------------------------------------------------
    $("#selectdutypersonBtn").click(function () {
      var paramValueString = "";
      commonDialog.CommonDialog("ryswxzq", function (data, selectIds) {
        var dataObj = JSON.parse(data);
        var fullname = dataObj.FULLNAME,
            uid = dataObj.USERID,
            dept = dataObj.ORGNAME,
            deptId = dataObj.CODE;
        //对象赋值
        $("input[name='dutyperson']").val(fullname);
        $("input[name='dutypersonid']").val(uid);
        $("input[name='dutydept']").val(dept);
        $("input[name='dutydeptid']").val(deptId);
      }, paramValueString);
    });
    //-- 责任人责任单位选择器 结束 --------------------------------------------------------------

    publicMethods.bottomFixd()
    form.on('select', function (data) {
      publicMethods.bottomFixd()
    });
    form.render();

    $("#run").click(function () {
      var flag=form.VerifyForm("wQbdProblemHandleDataForm");
      if(flag==false){
        return false;
      }
      runFlag=true;
      $("#urlFormSave").click();
    })
    function run(id) {
      var id = id;
      var fillman = $("input[name='fillman']").val();
      var filldept = $("input[name='filldept']").val();
      var filldate = $("input[name='filldate']").val();
      var fillmanaccount = $("input[name='fillmanaccount']").val();
      var filldeptid = $("input[name='filldeptid']").val();
      var filldepthospital = $("input[name='filldepthospital']").val();
      var filldepthospitalid = $("input[name='filldepthospitalid']").val();
      var flowStatus = $("input[name='flowStatus']").val();
      var belongdeptname = $("input[name='belongdeptname']").val();
      var secret = $("input[name='secret']").val();
      var registernum = $("input[name='registernum']").val();
      var proposetime = $("input[name='proposetime']").val();
      var model = $("input[name='model']").val();
      var proposedept = $("input[name='proposedept']").val();
      var proposedeptid = $("input[name='proposedeptid']").val();
      var dutyperson = $("input[name='dutyperson']").val();
      var dutypersonid = $("input[name='dutypersonid']").val();
      var dutydept = $("input[name='dutydept']").val();
      var dutydeptid = $("input[name='dutydeptid']").val();
      var status = $("input[name='status']").val();
      var impdept = $("input[name='impdept']").val();
      var impdeptid = $("input[name='impdeptid']").val();
      var productname = $("input[name='productname']").val();
      var doccode = $("input[name='doccode']").val();
      var changesuggest = $("input[name='changesuggest']").val();
      var changregnum = $("input[name='changregnum']").val();
      var proposerepresent = $("input[name='proposerepresent']").val();
      var imprepresent = $("input[name='imprepresent']").val();
      var problemhandleinfo = $("input[name='problemhandleinfo']").val();
      var probhandleurl = $("input[name='probhandleurl']").val();
      var dutyperson1 = $("input[name='dutyperson1']").val();
      var dutypersonid1 = $("input[name='dutypersonid1']").val();
      var plancomplettime = $("input[name='plancomplettime']").val();
      var impletstatus = $("input[name='impletstatus']").val();
      var measure = $("input[name='measure']").val();
      var tenantId = $("input[name='tenantId']").val();
      var createBy = $("input[name='createBy']").val();
      var createTime = $("input[name='createTime']").val();
      var updateBy = $("input[name='updateBy']").val();
      var updateTime = $("input[name='updateTime']").val();
      var registernumb = $("input[name='registernumb']").val();
      var nowData = {"id": id,"fillman": fillman,"filldept": filldept,"filldate": filldate,"fillmanaccount": fillmanaccount,"filldeptid": filldeptid,"filldepthospital": filldepthospital,"filldepthospitalid": filldepthospitalid,"flowStatus": flowStatus,"belongdeptname": belongdeptname,"secret": secret,"registernum": registernum,"proposetime": proposetime,"model": model,"proposedept": proposedept,"proposedeptid": proposedeptid,"dutyperson": dutyperson,"dutypersonid": dutypersonid,"dutydept": dutydept,"dutydeptid": dutydeptid,"status": status,"impdept": impdept,"impdeptid": impdeptid,"productname": productname,"doccode": doccode,"changesuggest": changesuggest,"changregnum": changregnum,"proposerepresent": proposerepresent,"imprepresent": imprepresent,"problemhandleinfo": problemhandleinfo,"probhandleurl": probhandleurl,"dutyperson1": dutyperson1,"dutypersonid1": dutypersonid1,"plancomplettime": plancomplettime,"impletstatus": impletstatus,"measure": measure,"tenantId": tenantId,"createBy": createBy,"createTime": createTime,"updateBy": updateBy,"updateTime": updateTime,"registernumb": registernumb};
      $.ajax({
        url:"${ctx}/qbdms/wQbdProblemHandle/run",
        type: "post",
        dataType: 'json',
        contentType : 'application/json',
        data: JSON.stringify(nowData),
        success : function (data) {
          if (common.filterRecord(data)) {
            layer.alert(publicMethods.confirmStyle(data.msg), {title: false, skin: 'confirm-class'}, function (index) {
              layer.close(index);
              window.location.href = '${ctx}/qbdms/wQbdProblemHandle/view/list';
            });
          } else {
            layer.alert(publicMethods.confirmStyle(data.msg), {title: false, skin: 'confirm-class'}, function (index) {
              layer.close(index);
              window.location.href = '${ctx}/qbdms/wQbdProblemHandle/view/list';
            });
          }
          return false;
        },
        error : function (XMLHttpRequest, textStatus, errorThrown) {
          layer.alert(publicMethods.confirmStyle("内容已保存，启动失败"), {title: false, skin: 'confirm-class'}, function (index) {
            layer.close(index);
            window.location.href = '${ctx}/qbdms/wQbdProblemHandle/view/list';
          });
        }
      })
    }
  });
</script>
</body>
</html>